<html>
    <head>
        <title>Welcome to WineXpress Client</title>
        <meta name="layout" content="main" />
        <style type="text/css" media="screen">

        #nav {
            margin-top:20px;
            margin-left:30px;
            width:228px;
            float:left;

        }
        .homePagePanel * {
            margin:0px;
        }
        .homePagePanel .panelBody ul {
            list-style-type:none;
            margin-bottom:10px;
        }
        .homePagePanel .panelBody h1 {
            text-transform:uppercase;
            font-size:1.1em;
            margin-bottom:10px;
        }
        .homePagePanel .panelBody {
            background: url(images/leftnav_midstretch.png) repeat-y top;
            margin:0px;
            padding:15px;
        }
        .homePagePanel .panelBtm {
            background: url(images/leftnav_btm.png) no-repeat top;
            height:20px;
            margin:0px;
        }

        .homePagePanel .panelTop {
            background: url(images/leftnav_top.png) no-repeat top;
            height:11px;
            margin:0px;
        }
        h2 {
            margin-top:15px;
            margin-bottom:15px;
            font-size:1.2em;
        }
        #pageBody {
            margin-left:280px;
            margin-right:20px;
        }
        </style>
    </head>
    <body>
        <div id="menubar">
            <div class="main_menu">
                <ul>
                    <li><a href="http://localhost:8088/WineXpressClient/aboutUs">About Us</a></li>
                    <li><a href="http://localhost:8088/WineXpressClient/product">Wine Catalogue</a></li>
                    <li><a href="http://localhost:8088/WineXpressClient/contactUs">Contact Us</a></li>
                    
                </ul>
            </div>
        </div>
      
        <div id="nav">
            <div class="homePagePanel">
                <div class="panelTop"></div>
                <div class="panelBody">
                  
                  <h1>Account Management</h1>
                  <g:if test="${!session.customerId}">
                      <a href="http://localhost:8088/WineXpressClient/memberRegistration">Member Registration</a><br/>
                      <a href="http://localhost:8088/WineXpressClient/memberLogin">Member Login</a>
                  </g:if>
                  
                  <g:if test="${session.customerId}">
                      <a href="http://localhost:8088/WineXpressClient/memberInfoManagement">Manage Account</a><br/>
                  </g:if>
                  
                  <g:if test="${session.customerUsername == 'admin'}">
                      <br/><br/>
                      <h1>Administrative</h1>
                      <a href="http://localhost:8088/WineXpressClient/accountStatusActivation">Account Status Activation</a>
                      
                      <br/><br/>
                      <h1>Wine Type Management</h1>
                      <a href="http://localhost:8088/WineXpressClient/wineTypeCreate">Create Wine Type</a><br/>
                      <a href="http://localhost:8088/WineXpressClient/wineTypeRead">Manage Wine Types</a><br/>
<!--                      <a href="http://localhost:8088/WineXpressClient/wineTypeDelete">Delete Wine Type</a>-->
                      
                      <br/><br/>
                      <h1>Wine Varietal Management</h1>
                      <a href="http://localhost:8088/WineXpressClient/wineVarietalCreate">Create Wine Varietal</a><br/>
                      <a href="http://localhost:8088/WineXpressClient/wineVarietalRead">Manage Wine Varietals</a><br/>
<!--                      <a href="http://localhost:8088/WineXpressClient/wineVarietalDelete">Delete Wine Varietal</a>-->
                      
                      <br/><br/>
                      <h1>Wine Region Management</h1>
                      <a href="http://localhost:8088/WineXpressClient/wineRegionCreate">Create Wine Region</a><br/>
                      <a href="http://localhost:8088/WineXpressClient/wineRegionRead">Manage Wine Regions</a><br/>
<!--                      <a href="http://localhost:8088/WineXpressClient/wineRegionDelete">Delete Wine Region</a>-->
                      
                      <br/><br/>
                      <h1>Wine Product Management</h1>
                      <a href="http://localhost:8088/WineXpressClient/wineCreate">Create Wine</a><br/>
                      <a href="http://localhost:8088/WineXpressClient/wineRead">Manage Wines</a><br/>
                      <a href="http://localhost:8088/WineXpressClient/wineUpdate">Update Wine</a><br/>
                      <a href="http://localhost:8088/WineXpressClient/wineDelete">Delete Wine</a>
                  </g:if>
                </div>
                <div class="panelBtm"></div>
            </div>
        </div>
      
        <div id="pageBody">
            <h1>Welcome to WineXpress Client</h1>
            <br/>
            
            ${flash.message}
            
            <g:if test="${session.customerId}">
              <br/>
              Welcome ${session.customerName}! | <g:link controller="login" action="memberLogout">Logout</g:link>
            </g:if>
            
            <div id="controllerList" class="dialog">
                <h2>Available Controllers:</h2>
                <ul>
                    <g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
                        <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li>
                    </g:each>
                </ul>
            </div>
            
            <h1>Application Status</h1>
                <ul>
                    <li>App version: <g:meta name="app.version"></g:meta></li>
                    <li>Grails version: <g:meta name="app.grails.version"></g:meta></li>
                    <li>Groovy version: ${org.codehaus.groovy.runtime.InvokerHelper.getVersion()}</li>
                    <li>JVM version: ${System.getProperty('java.version')}</li>
                    <li>Controllers: ${grailsApplication.controllerClasses.size()}</li>
                    <li>Domains: ${grailsApplication.domainClasses.size()}</li>
                    <li>Services: ${grailsApplication.serviceClasses.size()}</li>
                    <li>Tag Libraries: ${grailsApplication.tagLibClasses.size()}</li>
                </ul>
                <h1>Installed Plugins</h1>
                <ul>
                    <g:set var="pluginManager"
                            value="${applicationContext.getBean('pluginManager')}"></g:set>

                    <g:each var="plugin" in="${pluginManager.allPlugins}">
                        <li>${plugin.name} - ${plugin.version}</li>
                    </g:each>

                </ul>

            
        </div>
    </body>
</html>
